package my.jdbc;

import java.io.IOException;
import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class IPConfigUtil {

	public static final String PLATFORM_DB_IP = "platformDB.ip";
	public static final String TRANSFER_DB_IP = "transferDB.ip";
	public static final String BFCENTER_DB_IP = "bfCenterDB.ip";

	private static Properties pro = null;

	static {
		try {
			pro = PropertiesLoaderUtils.loadProperties(new ClassPathResource("ipConfig.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String getProperty(String proName) {
		return pro.getProperty(proName).trim();
	}
}
